package com.xbts.screen.controller.workshop;

import com.xbts.common.core.web.controller.BaseController;
import com.xbts.common.core.web.domain.AjaxResult;
import com.xbts.common.core.web.domain.BaseHistogramResult;
import com.xbts.common.security.annotation.RequiresPermissions;
import com.xbts.screen.domain.vo.WorkshopRateVO;
import com.xbts.screen.domain.vo.WorkshopTrendVO;
import com.xbts.screen.service.IAssayService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 药水化验品质Controller
 */
@Api(tags = "药水化验品质车间")
@RestController
@RequestMapping("/assay")
public class AssayController extends BaseController {


    @Autowired
    private IAssayService assayService;

    /**
     * 膜厚趋势图
     */
    @ApiOperation("膜厚趋势图")
    @RequiresPermissions("workshop:assay:thicknessTrend")
    @GetMapping("/thicknessTrend")
    public AjaxResult thicknessTrend(){
        WorkshopTrendVO vo = assayService.thicknessTrend();
        return success(vo);
    }
    /**
     * UC2+趋势图
     */
    @ApiOperation("UC2+趋势图")
    @RequiresPermissions("workshop:assay:UC2Trend")
    @GetMapping("/UC2Trend")
    public AjaxResult UC2Trend(){
        WorkshopTrendVO vo = assayService.UC2Trend();
        return success(vo);
    }
    /**
     * 比重趋势图
     */
    @ApiOperation("比重趋势图")
    @RequiresPermissions("workshop:assay:proportionTrend")
    @GetMapping("/proportionTrend")
    public AjaxResult proportionTrend(){
        WorkshopTrendVO vo = assayService.proportionTrend();
        return success(vo);
    }
    /**
     * 除胶速率趋势图
     */
    @ApiOperation("除胶速率趋势图")
    @RequiresPermissions("workshop:assay:gelRemovalRateTrend")
    @GetMapping("/gelRemovalRateTrend")
    public AjaxResult gelRemovalRateTrend(){
        WorkshopTrendVO vo = assayService.gelRemovalRateTrend();
        return success(vo);
    }
    /**
     * 微蚀速率趋势图
     */
    @ApiOperation("微蚀速率趋势图")
    @RequiresPermissions("workshop:assay:microCorrosionRateTrend")
    @GetMapping("/microCorrosionRateTrend")
    public AjaxResult microCorrosionRateTrend(){
        WorkshopTrendVO vo = assayService.microCorrosionRateTrend();
        return success(vo);
    }
    /**
     * 沉积速率趋势图
     */
    @ApiOperation("沉积速率趋势图")
    @RequiresPermissions("workshop:assay:depositionRateTrend")
    @GetMapping("/depositionRateTrend")
    public AjaxResult depositionRateTrend(){
        WorkshopTrendVO vo = assayService.depositionRateTrend();
        return success(vo);
    }
    /**
     * 一次检查合格率
     */
    @ApiOperation("一次检查合格率")
    @RequiresPermissions("workshop:assay:firstInspectionPassRateTrend")
    @GetMapping("/firstInspectionPassRateTrend")
    public AjaxResult firstInspectionPassRateTrend() {
        BaseHistogramResult result = assayService.firstInspectionPassRateTrend();
        return success(result);
    }
    /**
     * 二次检查合格率
     */
    @ApiOperation("二次检查合格率")
    @RequiresPermissions("workshop:assay:secondaryInspectionPassRateTrend")
    @GetMapping("/secondaryInspectionPassRateTrend")
    public AjaxResult samplingPassRateTrend(){
        BaseHistogramResult result = assayService.secondaryInspectionPassRateTrend();
        return success(result);
    }
    /**
     * OSP
     */
    @ApiOperation("OSP")
    @RequiresPermissions("workshop:assay:OSP_Rate")
    @GetMapping("/OSP_Rate")
    public AjaxResult OSP_Rate(){
        List<WorkshopRateVO> vos = assayService.OSP_Rate();
        return success(vos);
    }
    /**
     * 蚀刻药水
     */
    @ApiOperation("蚀刻药水")
    @RequiresPermissions("workshop:assay:etchingSolutionRate")
    @GetMapping("/etchingSolutionRate")
    public AjaxResult etchingSolutionRate(){
        List<WorkshopRateVO> vos = assayService.etchingSolutionRate();
        return success(vos);
    }
    /**
     * 线路显影
     */
    @ApiOperation("线路显影")
    @RequiresPermissions("workshop:assay:lineDevelopmentRate")
    @GetMapping("/lineDevelopmentRate")
    public AjaxResult lineDevelopmentRate(){
        List<WorkshopRateVO> vos = assayService.lineDevelopmentRate();
        return success(vos);
    }
    /**
     * 防焊显影
     */
    @ApiOperation("防焊显影")
    @RequiresPermissions("workshop:assay:solderMaskDevelopmentRate")
    @GetMapping("/solderMaskDevelopmentRate")
    public AjaxResult solderMaskDevelopmentRate(){
        List<WorkshopRateVO> vos = assayService.solderMaskDevelopmentRate();
        return success(vos);
    }
    /**
     * 成品清洗线
     */
    @ApiOperation("成品清洗线")
    @RequiresPermissions("workshop:assay:cleaningLineRate")
    @GetMapping("/cleaningLineRate")
    public AjaxResult cleaningLineRate(){
        List<WorkshopRateVO> vos = assayService.cleaningLineRate();
        return success(vos);
    }
    /**
     * 线路前处理
     */
    @ApiOperation("线路前处理")
    @RequiresPermissions("workshop:assay:linePreProcessingRate")
    @GetMapping("/linePreProcessingRate")
    public AjaxResult linePreProcessingRate(){
        List<WorkshopRateVO> vos = assayService.linePreProcessingRate();
        return success(vos);
    }
    /**
     * 防焊前处理
     */
    @ApiOperation("防焊前处理")
    @RequiresPermissions("workshop:assay:solderMaskPreProcessingRate")
    @GetMapping("/solderMaskPreProcessingRate")
    public AjaxResult solderMaskPreProcessingRate(){
        List<WorkshopRateVO> vos = assayService.solderMaskPreProcessingRate();
        return success(vos);
    }
    /**
     * 沉铜-PTH
     */
    @ApiOperation("沉铜-PTH")
    @RequiresPermissions("workshop:assay:PTH_Rate")
    @GetMapping("/PTH_Rate")
    public AjaxResult PTH_Rate(){
        List<WorkshopRateVO> vos = assayService.PTH_Rate();
        return success(vos);
    }
    /**
     * 沉铜-PTH二次化验
     */
    @ApiOperation("沉铜-PTH二次化验")
    @RequiresPermissions("workshop:assay:PTH_SecondaryRate")
    @GetMapping("/PTH_SecondaryRate")
    public AjaxResult PTH_SecondaryRate(){
        List<WorkshopRateVO> vos = assayService.PTH_SecondaryRate();
        return success(vos);
    }
    /**
     * 电镀
     */
    @ApiOperation("电镀")
    @RequiresPermissions("workshop:assay:platingRate")
    @GetMapping("/platingRate")
    public AjaxResult platingRate(){
        List<WorkshopRateVO> vos = assayService.platingRate();
        return success(vos);
    }


}
